package com.ja.openchat.viewmodels;

import android.app.Application;
import android.os.Bundle;

import androidx.annotation.NonNull;

import com.ja.openchat.ui.me.SetAliWeChatPayAccountFragment;
import com.ja.openchat.ui.me.SetBankCardAccountFragment;

import me.goldze.mvvmhabit.base.BaseViewModel;
import me.goldze.mvvmhabit.binding.command.BindingAction;
import me.goldze.mvvmhabit.binding.command.BindingCommand;


public class WithdrawalAccountViewModel extends BaseViewModel {

    public WithdrawalAccountViewModel(@NonNull Application application) {
        super(application);
    }

    //绑定微信的点击事件
    public BindingCommand weChatPayOnClickCommand = new BindingCommand(new BindingAction() {
        @Override
        public void call() {
            Bundle bundle = new Bundle();
            bundle.putInt("type", 2);
            startContainerActivity(SetAliWeChatPayAccountFragment.class.getCanonicalName(), bundle);
        }
    });
    //绑定支付宝的点击事件
    public BindingCommand alipayOnClickCommand = new BindingCommand(new BindingAction() {
        @Override
        public void call() {
            Bundle bundle = new Bundle();
            bundle.putInt("type", 1);
            startContainerActivity(SetAliWeChatPayAccountFragment.class.getCanonicalName(), bundle);
        }
    });
    //绑定银行卡的点击事件
    public BindingCommand bankCardOnClickCommand = new BindingCommand(new BindingAction() {
        @Override
        public void call() {
            startContainerActivity(SetBankCardAccountFragment.class.getCanonicalName());
        }
    });

}
